import request from '@/utils/request'
/**
 *查询全部
 *params datas object
 */
export function queryList(datas) {
  return request({
    url: '/smc/api/modelPermission/' + datas.sysid,
    method: 'get',
    params: {
      modelid: datas.modelid,
      pageNum: datas.pageNum,
      pageSize: datas.pageSize
    }
  })
}

// 修改数据 dataset object
export function update(datas) {
  return request({
    url: '/smc/api/modelPermission',
    method: 'put',
    data: {
      sysid: datas.sysid,
      modelid: datas.modelid,
      modelname: datas.modelname,
      permissionid: datas.permissionid,
      permissionname: datas.permissionname,
      permissionclassic: datas.permissionclassic,
      forall: datas.forall
    }
  })
}
// 删除
export function deletes(datas) {
  return request({
    url: '/smc/api/modelPermission/' + datas.sysid + '/' + datas.permissionid,
    method: 'delete'
  })
}
// 新增  dataset object
export function add(datas) {
  return request({
    url: '/smc/api/modelPermission',
    method: 'post',
    data: {
      sysid: datas.sysid,
      modelid: datas.modelid,
      modelname: datas.modelname,
      permissionname: datas.permissionname,
      permissionclassic: datas.permissionclassic,
      forall: datas.forall
    }
  })
}
